#ifndef MYINFOBAR_H
#define MYINFOBAR_H

#include "SDL/SDL.h"
#include "SDL/SDL_image.h"
#include <string>

class MyGame;

/*! 
 *  \class MyInfobar
 *  \brief Displays information about player, such as life, mana, actual weapon and spell, gold and enemy kills
 *  \author Peter Kosa
 *  \version 1.52
 *  \date    2006-2008
 */
class MyInfobar
{
public:
	MyInfobar(MyGame *_parent);
	~MyInfobar();
	
	/*! surface for whole infobar */
	SDL_Surface* infobarSheet;			
	/*! bkp surface, so we don't have to go to disk every time */
	SDL_Surface* infobarSheetBkp;		
	/*! fps displaying sheet */
	SDL_Surface* topInfobarSheet;

	bool redraw_needed;
	/*! compares values with actPlayer values, sets flag if redraw is needed */
	void update_pools_info();
	/*! draws the infobar on screen*/
	void draw_infobar();
	/*! load imgs needed for infobar */
	void load_imgs();
	/*! make infobar from current game information */
	void make_infobar();
	/*! display message containing fps */
	void make_top_msg(const char* _message);

	char enemies_killed_text[6], money_text[6];

	MyGame* parent;	
private:
	//safety flags for deinit
	bool wasInit;

	int life_displayed_cur;
	int life_displayed_max;
	int mana_displayed_cur;
	int mana_displayed_max;
};
#endif
